phy_position_yprevious

The previous y position of the instance in the physics world.

语法:

phy_position_yprevious;


返回: Real(实数)


描述

This variable can be used to get (or to set) the previous y position of the instance within the game room physics world. This is the position of the instance within the physics world in the previous step to the current one.


例如:

xx = phy_position_xprevious;
yy = phy_position_yprevious;

The above code stores the previous x and y position for the physics enabled instance in two variables.


上一页: Physics Variables
next: phy_rotation
© Copyright YoYo Games Ltd. 2018 All Rights Reserved